/*************************************************
 * 
 * Copyright by Bruno Eberhard
 * 
 * Created on 29.07.2005
 *
 *************************************************/
package fightplan.ui;

import java.awt.BorderLayout;
import java.awt.Component;

import javax.swing.JPanel;
import javax.swing.JScrollPane;

@SuppressWarnings("serial")
public class LeftMenuPanel extends JPanel {
	private ControlList controlList;
	private CardPanel cardPanel;

	public LeftMenuPanel() {
		super(new BorderLayout());
		cardPanel = new CardPanel();
		controlList = new ControlList(cardPanel);
		add(new JScrollPane(controlList), BorderLayout.WEST);
		add(cardPanel, BorderLayout.CENTER);
	}

	public void addCard(Component component, String displayName, String iconName) {
		cardPanel.addCard(component);
		controlList.addElement(component, displayName, iconName);
	}

}
